<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
if ("1".equals(request.getAttribute("message"))){
%>
<script>
	alert("用户名或密码不正确!");
</script>
<%
}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <%
     String path=request.getContextPath();
   %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>实验室管理平台</title>
<link href="css/style_login.css" rel="stylesheet" type="text/css" />
	<link href="css/addChance.css" rel="stylesheet" type="text/css"/>
	 <script language="javascript" type="text/javascript">
		function Check()
		{
			var Name = document.getElementById('userName').value;
			var Paswrd =  document.getElementById('password').value;
			if (Name == "")
			{
				alert("用户名不能为空！");
				return false;
			}
			 
			if (Paswrd == "")
			{
				alert("密码不能为空！");
				return false;
			}
			
			if (Name.length>16 || Paswrd.length>16) 	  
			{
				alert("用户名或密码的长度不能超过16个字符！");
				return false;
			}
			return true;
			this.form1.Submit();
		}
	</script>
</head>

<body style="background:#CCD3E3 url(images/login_bg.jpg) repeat-x;margin-top:expression((document.documentElement.clientHeight-377)/2+'px');"  oncontextmenu=self.event.returnValue=false onMouseOver="window.status='none';return true;" >
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td>
<table width="560" height="377" border="0" align="center" cellpadding="0" cellspacing="0" background="images/login_bgz.jpg">
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="353"><table border="0" align="right" cellpadding="0" cellspacing="10">
         
          <tr>
            <td>
              <div align="center"><b>欢迎登陆任逍遥后台管理</b></div>
              <s:form method="post" action="checkLoginNameAndPasswordAction.action" theme="simple" onsubmit="return (Check() && findNameNotExit())" target="_self">
              <table border="0" align="center" cellpadding="0" cellspacing="25" class="l_font">
                <tr>
                  <td align="left">
                  	<div>
	                  	<font color="red">
	              		</font> <p>
              		</div>
                 
                  	用户名
                  	<s:textfield  name="admin.userName" id="userName" cssStyle="width:120px;" cssClass="login_2"/>
                  	<br/>
                  	
                  </td>
                </tr>
                <tr>
                  <td align="left">密　码
                  	<s:password  name="admin.plainPassword" id="password" cssStyle="width:120px;" cssClass="login_2"/>
                  	
                </tr>
                
                <tr>
                  <td height="55" align="center">
                      <input type="submit" name="Submit" value="登录" class="anybutton" style="width:60px;"/>
                      <input name="Reset" type="reset"  class="anybutton" value="取消" style="width:60px; onclick="window.close();"/></td>
                </tr>
				
            </table>
            </s:form>
           </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center">- COPYRIGHT(C)BJT 2011 <a href="http://www.beijingtest.com" target="_blank">http://www.beijingtest.com</a> -</td>
        </tr>
    </table></td>
  </tr>
</table>
</td></tr></table>
<div style="display: none;"><%=System.currentTimeMillis() %></div>
</body>
</html>


